// 导入请求实例

import axios from "./request.js"

export function fetchLogin(formData) {
    return axios.post('/login',formData)
}
// 添加地址
export function fetchAddAddress(user_id, data) {
    return instance.post(`/addaddress/${user_id}`, data)
}

// 获取用户地址
export function fetchUserAddress(user_id) {
    return instance.get(`/getaddress/${user_id}`)
}

// 删除用户地址
export function fetchDelUserAddress(address_id) {
    return instance.post(`/deladdress/${address_id}`)
}

export function fetchRegister(formData) {
    return axios.post('/register',formData)
}

export function upload(formData) {
    return axios.post('/upload',formData)
}

